package com.example.wananrdroid.presenter;

import com.example.wananrdroid.base.BasePresenter;
import com.example.wananrdroid.bean.ArticleBean;
import com.example.wananrdroid.bean.BannerBean;
import com.example.wananrdroid.model.HomeCallBack;
import com.example.wananrdroid.model.HomeModel;
import com.example.wananrdroid.view.HomeView;

public class HomePresenter extends BasePresenter<HomeView> implements HomeCallBack {
    private HomeModel model;
    @Override
    protected void initModel() {
        this.model=new HomeModel();
        addModel(model);
    }
    public void getdata(){
        model.Homedata(this);
    }
    @Override
    public void onSuccess(ArticleBean article) {
        mview.onSuccess(article);
    }

    @Override
    public void onFali(String arterror) {
        mview.onFali(arterror);
    }

    @Override
    public void onSuccess(BannerBean badata) {
        mview.onSuccess(badata);
    }

    @Override
    public void onFali1(String badata) {
        mview.onFali1(badata);
    }
}
